import {http} from '@/utils/http/axios';

export interface StatisticResponseModel<T = any> {
  state: boolean;
  message: string;
  data: T;
}

/**
 * @description: 根据用户id获取用户菜单
 */
export function queryStatistics(params) {
  return http.request({
    url: `/queryAll`,
    method: 'GET',
    params,
  });
}

export function getProjectList() {
  return http.request({
    url: '/projects',
    method: 'GET',
  });
}

export function getRegionList(params) {
  return http.request({
    url: `/regions`,
    method: 'GET',
    params,
  });
}

export function queryNearlyDays(params) {
  return http.request({
    url: `/queryNearlyDays`,
    method: 'GET',
    params,
  });
}

export function queryTopCountries(params) {
  return http.request({
    url: `/queryTop20Countries`,
    method: 'GET',
    params,
  });
}

export function queryTotalCounts(params) {
  return http.request({
    url: `/queryTotalCounts`,
    method: 'GET',
    params,
  });
}

export function queryProjectCounts(params) {
  return http.request({
    url: `/queryProjectCounts`,
    method: 'GET',
    params,
  });
}

export function getProjects() {
  return http.request({
    url: `/projects`,
    method: 'GET',
    baseURL:'dev',
  }, {
    isTransformResponse:false,
    isReturnNativeResponse:false
  });
}
export function queryByProject(params) {
  return http.request({
    url: `/queryByProject`,
    method: 'GET',
    baseURL:'dev',
    params,
  }, {
    isTransformResponse:false,
    isReturnNativeResponse:false
  });
}
